<template>
    <view>
        <!-- components/advertisDetails/advertisDetails.wxml -->
        <view class="content" v-if="activityStatus == 1">
            <view class="tit">{{ title }}</view>
            <view class="time">{{ timeS=='null'?'':timeS!='undefined'?timeS:'' }}</view>
            <rich-text :nodes="conter" style="width: 100%"></rich-text>
        </view>
        <view v-if="activityStatus == 2">
            <view class="imagesize">
                <image class="upgrading" src="https://oos-cn.ctyunapi.cn/front-end/static/homeSub/images/activityStart.png" mode=""></image>
            </view>
            <view class="txt">
                <view class="txt1">
                    活动开始时间
                    <text class="fromDate">{{ timeS }}</text>
                    敬请期待！
                </view>
            </view>
        </view>
        <view v-if="activityStatus == 3">
            <view class="imagesize">
                <image class="upgrading" src="https://oos-cn.ctyunapi.cn/front-end/static/homeSub/images/activityOver.png" mode=""></image>
            </view>
            <view class="txt">
                <view class="txt1">哎呀！来晚了，活动结束了~</view>
            </view>
        </view>
    </view>
</template>

<script>
'use strict'; // components/advertisDetails/advertisDetails.ts

var app = getApp();
export default {
    data() {
        return {
            conter: '',
            activityStatus: 0,
            title: '',
            timeS: ''
        };
    },
    /**
     * 生命周期函数--监听页面加载
     */
    onLoad: function (options) {
		if(options.title){
		            uni.setNavigationBarTitle({
		                title:options.title
		            })

        var test = app.globalData.richText.replace(/\<img/gi, '<img class="imgs"'); // console.log(`🍬 ~ file: advertisDetails.ts ~ line 17 ~ onLoad ~ test`, test)

        this.conter=test
		this.title=options.title,
		this.timeS=options.time,
		this.activityStatus=options.status
		}
    },
    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady: function () {},
    /**
     * 生命周期函数--监听页面显示
     */
    onShow: function () {},
    /**
     * 生命周期函数--监听页面隐藏
     */
    onHide: function () {},
    /**
     * 生命周期函数--监听页面卸载
     */
    onUnload: function () {},
    /**
     * 页面相关事件处理函数--监听用户下拉动作
     */
    onPullDownRefresh: function () {},
    /**
     * 页面上拉触底事件的处理函数
     */
    onReachBottom: function () {},
    /**
     * 用户点击右上角分享
     */
    onShareAppMessage: function () {},
    methods: {}
};
</script>
<style lang="less">
	@import url("./advertisDetails.less");
/* homeSub/pages/advertisDetails/advertisDetails.wxss */
</style>
